/**
 * Copyright &copy; 2013-2015 山东易科德软件有限公司   All rights reserved.
 */
package cn.net.ecode.modules.file.entity;

import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;

import cn.net.ecode.common.persistence.DataEntity;
import cn.net.ecode.common.persistence.annotation.Id;

/**
 * 文件用户管理Entity
 * @author jiangwenchao
 * @version 2015-03-18
 */
public class FileUser extends DataEntity<FileUser> {
	
	private static final long serialVersionUID = 1L;
	private String fileUserId;		// 文件用户id
	private String fileName;		// 源文件名称
	private String fileCategory;	// 文件分类（image图片、media媒体、file文档）
	private FileEntity fileEntity;
	
	public FileUser() {
		super();
	}

	public FileUser(String fileUserId){
		super();
		this.fileUserId = fileUserId;
	}

	public FileUser(FileEntity fileEntity) {
		super();
		this.fileEntity = fileEntity;
	}

	@Id
	public String getFileUserId() {
		return fileUserId;
	}

	public void setFileUserId(String fileUserId) {
		this.fileUserId = fileUserId;
	}
	
	@NotBlank(message="源文件名称不能为空")
	@Length(min=0, max=500, message="源文件名称长度不能超过 500 个字符")
	public String getFileName() {
		return fileName;
	}

	public void setFileName(String fileName) {
		this.fileName = fileName;
	}
	
	
	@Length(min=0, max=20, message="文件分类（image图片、media媒体、file文档）长度不能大于 20 个字符")
	public String getFileCategory() {
		return fileCategory;
	}

	public void setFileCategory(String fileCategory) {
		this.fileCategory = fileCategory;
	}

	public FileEntity getFileEntity() {
		return fileEntity;
	}

	public void setFileEntity(FileEntity fileEntity) {
		this.fileEntity = fileEntity;
	}
	
}